Basic Computer Skills .htm

Basic Computer Skills .htm

About us  Contact  post comment  Teb Computer Academy  

TEB   Computer  Kids  Academy



Data Science



Data Science - Statistics Variance


Variance


- Statistics Variance is another number that indicates
how spread out the values are.


Note: if you take the square root of the variance,
you get the standard deviation.
Or the other way around,
if you multiply the standard deviation by itself,
you get the variance!

you can now use the data set with 10 observations
to give an example of
how we can calculate the variance:



Let us take this task step-by-step.

Step 1: to Calculate the Variance: Find the Mean
We want to find the variance of Average_Pulse.

1. Find the mean:
(80+85+90+95+100+105+110+115+120+125) / 10 = 102.5
The mean is 102.5


Step 2: For Each Value, find the Difference From the Mean

Here, find the difference from the mean for each value:

80 - 102.5 = -22.5
85 - 102.5 = -17.5
90 - 102.5 = -12.5
95 - 102.5 = -7.5
100 - 102.5 = -2.5
105 - 102.5 = 2.5
110 - 102.5 = 7.5
115 - 102.5 = 12.5
120 - 102.5 = 17.5
125 - 102.5 = 22.5

Step 3: For Each Difference - Find the Square Value
3. Find the square value for each difference:
(-22.5)^2 = 506.25
(-17.5)^2 = 306.25
(-12.5)^2 = 156.25
(-7.5)^2 = 56.25
(-2.5)^2 = 6.25
2.5^2 = 6.25
7.5^2 = 56.25
12.5^2 = 156.25
17.5^2 = 306.25
22.5^2 = 506.25

Note: you must square the values to get the total spread.

Step 4:
The Variance is the Average Number of These Squared Values.
4. Sum the squared values and find the average:

(506.25 + 306.25 + 156.25 + 56.25 +
6.25 + 6.25 + 56.25 + 156.25 +
306.25 + 506.25) / 10 = 206.25

the variance is 206.25.

Now let us Use Python to Find the Variance of health_data.

you can use the var() function from Numpy to:
find the variance
(note that you now use the first data set with 10 observations):

import numpy as np
var = np.var(health_data)
print(var)

Output


And finally, you use Python to Find the Variance of Full Data Set.
you can now calculate the variance for each column for the full data set:

Example
import numpy as np
var_full = np.var(full_health_data)
print(var_full)

Output





Professional courses:

participant -Kids, Youths and Adults alike
learn and aquire these professional Courses

Professional Courses:


  • Informatiker

  • Website programming

  • IT Consultant

  • IT Security

  • Java Programming
  • Software Developer

  • IT Admin.

  • IT FORENSIC


  • Python Programming
  • programming with C++
  • Data Science



  • Are you parents, teachers or affiliate schools, pls. click here.








    click here to view 'KITAS' arround you